﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BlueCMS.Core.Entities
{
    public class UserRoleLink
    {
        public Guid user_id { get; set; }
        public Guid role_id { get; set; }
        public Guid website_id { get; set; }

        public UserRoleLink() { }

        public UserRoleLink(User user, Role role)
        {
            if (user.website_id != role.website_id)
            {
                throw new ArgumentException("User and Role not from same website.");
            }

            user_id = user.user_id;
            role_id = role.role_id;
            website_id = user.website_id;
        }
    }
}
